<?php
/**
 * Created by PhpStorm
 * User: 龍zero
 * Date: 2022-04-19
 * Time: 17:44
 */

namespace App\Service;

use Hyperf\Contract\ConfigInterface;
use Psr\Container\ContainerInterface;
use function Hyperf\Support\make;

class TokenServiceFactory
{
    public function __invoke(ContainerInterface $container)
    {
        $config = $container->get(ConfigInterface::class);
        $accessKey = $config->get('jwt.guards.cms.access','');
        $refreshKey = $config->get('jwt.guards.cms.refresh','');
        return make(TokenProvideService::class,compact("accessKey","refreshKey"));
    }
}